//
//  SDCameraStatusCell.m
//  SKinDiary
//
//  Created by pcyang on 16/7/16.
//  Copyright © 2016年 tencent. All rights reserved.
//

#import "SDCameraStatusCell.h"
#import "SDPhotoTagView.h"


@interface SDCameraStatusCell()<PhotoTagViewDelegate>

@end


@implementation SDCameraStatusCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {

    }
    return self;
}

-(void)initView
{
    [super initView];
    self.titleLabel.text = @"拍照状态";
    [self.titleLabel sizeToFit];
}

-(void)initData
{
    self.tagItemsArray = [SDCameraStatusCell getTagItems];
    self.tagViewsArray = [NSMutableArray arrayWithCapacity:self.tagItemsArray.count];
    for (PhotoTagItem* tagItem in self.tagItemsArray) {
        SDPhotoTagView* tagItemView = [SDPhotoTagView buttonWithType:UIButtonTypeCustom];
        tagItemView.delegate = self;
        [self.contentView addSubview:tagItemView];
        [tagItemView setTagItem:tagItem];
        [self.tagViewsArray addObject:tagItemView];
    }
}

+(NSMutableArray*)getTagItems
{
    NSMutableArray* tagItems = [NSMutableArray arrayWithCapacity:2];
    PhotoTagItem* tagItem1 = [[PhotoTagItem alloc] init];
    tagItem1.title = @"洁面前";
    
    PhotoTagItem* tagItem2 = [[PhotoTagItem alloc] init];
    tagItem2.title = @"洁面后";
    
    PhotoTagItem* tagItem3 = [[PhotoTagItem alloc] init];
    tagItem3.title = @"润肤前";
    
    PhotoTagItem* tagItem4 = [[PhotoTagItem alloc] init];
    tagItem4.title = @"润肤后";
    
    PhotoTagItem* tagItem5 = [[PhotoTagItem alloc] init];
    tagItem5.title = @"面膜前";
    
    PhotoTagItem* tagItem6 = [[PhotoTagItem alloc] init];
    tagItem6.title = @"面膜后";
    
    PhotoTagItem* tagItem7 = [[PhotoTagItem alloc] init];
    tagItem7.title = @"化妆后";

    
    [tagItems addObject:tagItem1];
    [tagItems addObject:tagItem2];
    [tagItems addObject:tagItem3];
    [tagItems addObject:tagItem4];
    [tagItems addObject:tagItem5];
    [tagItems addObject:tagItem6];
    [tagItems addObject:tagItem7];

    return tagItems;
}

@end
